/*
 * @Description: 
 * @Version: 0.0
 * @Author: taosong
 * @Date: 2023-12-10 22:37:26
 * @LastEditors: taosong
 * @LastEditTime: 2023-12-11 19:11:05
 */
// 类就是拥有相同属性和方法的一系列对象的集合

class People {
  name: string
  age: number
  static count:number = 0
  constructor(_name: string, _age: number) {
    this.name = _name
    this.age = _age
    People.count++
  }
  doEat() {}
}

let p1 = new People('wangwu', 23)
let p2 = new People('wangwu', 23)
console.log(People.count)